package com.codelife.one.Clone;

/**
 * @ClassName Stuend
 * @Description TODO
 * @Date 2019/10/22 16:06
 * @Version 1.0
 **/
public class Stuend implements Cloneable{
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Object stuend=null;
        try{
            stuend =(Stuend)super.clone();
        }catch (Exception e){
            System.out.println(e);
        }

        return stuend;
    }

    @Override
    public String toString() {
        return "Stuend{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
